<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML>
<html>
  <head>
    <base href="<%=basePath%>">
	<meta name="viewport" content="width=device-width, initial-scale=1">
	<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
	<title>滴滴法律</title>
	<link rel="stylesheet" type="text/css" href="css/normalize.css">
	<link rel="stylesheet" type="text/css" href="css/bootstrap.min.css">
	<link rel="stylesheet" type="text/css" href="css/my-style.css">
	<!--[if lt IE 9]> 
		<script src="js/html5shiv.min.js"></script> 
	<![endif]-->
</head>
<body>
	<!-- 导航栏 -->
	<header>
		<nav class="navbar navbar-inverse">
			<div class="container">
				<div class="navbar-header">
					<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar-collapse-1" aria-expanded="false">
		        <span class="sr-only">Toggle navigation</span>
		        <span class="icon-bar"></span>
		        <span class="icon-bar"></span>
		        <span class="icon-bar"></span>
		      </button>
		      <a class="navbar-brand" href="index.html">
		        <img alt="LOGO" src="img/logo.png">
		      </a>
				</div>
				<div class="collapse navbar-collapse" id="navbar-collapse-1">
					<ul class="nav navbar-nav navbar-left">
						  <li><a href="index/home">首页</a></li>
	        			  <li><a href="lawyer/list">法律人</a></li>
				          <li><a href="contract/list">法律产品</a></li>
				          <li><a href="knowledge/index">法律知识</a></li>
	          			  <li><a href="#">招聘</a></li>
					</ul>

					<ul class="nav navbar-nav navbar-right">						
	          <li><a href="user/person">${sessionScope.user.username}<span class="caret"></span></a></li>
					</ul>
				</div>
			</div>
		</nav>
	</header>
	

	<section>
		<div class="container">
			<div class="row">
				<div class="col-md-3 col-sm-3 col-xs-12">
					<div class="sidebar-box sidebar-per-list show-per-list">
						<ul class="per-list-ul" id="per-list-ul">
							<li class="list-cur"><a href="javascript:;">我的咨询</a></li>
							<li><a href="javascript:;">查看帮助</a></li>
						</ul>
					</div>
					<br/>
					<div class="col-md-12 text-center hidden-xs clear-padding">
						<img src="img/personadv.jpg" alt="" width="260" height="200">
					</div>
				</div>


				<div class="col-md-9 col-sm-9 col-xs-12">

				<!-- 我的咨询内容开始 -->
					<div class="sidebar-box sidebar-per-list show-per-list clearfix" id="sidebar-per-list1">
						<div class="per-buy-ul" id="per-req-ul">
							<ul>
								<li class="list-buy-cur"><a href="javascript:;">待回答</a></li>
								<li><a href="javascript:;">已回答</a></li>
							</ul>
						</div>
						<!-- 待回答内容 -->
						<div class="per-req-con per-buy-con-cur clearfix" id="per-req-con1">
							<c:forEach items="${questions}" var="questions">
							<div class="dotted">
								<h4><strong>${questions.questitle}</strong></h4>
								<div class="col-md-12">
									<p class="text-muted">${questions.quescontent}</p>
								</div>
								<div style="margin-bottom:15px;">
									<a class="req-toggle" href="javascript:;"><strong>等待<span>${questions.name}</span>回答问题</strong></a>
								</div>								
							</div>
							</c:forEach>
						</div>

						<!-- 已回答内容 -->
						<div class="per-req-con clearfix" id="per-req-con2">
							<c:forEach items="${replys}" var="replys">
							<div class="dotted clearfix">
								<h4><strong>${replys.quesTitle}</strong></h4>
								<div class="col-md-12">
									<p class="text-muted">${replys.quesContent}</p>
								</div>
								<div style="margin-bottom:10px;">
									<a class="req-toggle" href="javascript:;"><strong>律师<span></span>的回答</strong></a>
									
								</div>
								<div class="col-md-12">
									<p class="text-muted">${replys.replycontent}</p>
								</div>
							</div>	
							</c:forEach>
						</div>


					</div><!-- 我的咨询内容结束 -->





					<!-- 查看帮助内容开始 -->
					<div class="sidebar-box sidebar-per-list clearfix" id="sidebar-per-list3">
						<p>查看帮助</p>

					</div><!-- 查看帮助内容结束 -->






				</div>
			</div>
		</div>
	</section>



	<script type="text/javascript" src="js/jquery.min.js"></script>
	<script type="text/javascript" src="js/bootstrap.min.js"></script>
	<script type="text/javascript">
	$(function(){
		//我的咨询,我的购买,查看帮助,账号设置标签切换
		$('#per-list-ul li').each(function(index1){
			var $sidebarPerList = $('#sidebar-per-list1, #sidebar-per-list2, #sidebar-per-list3, #sidebar-per-list4');
			$(this).click(function(){
				var _this = $(this);
				$('#per-list-ul li').removeClass('list-cur');
				_this.addClass('list-cur');
				$sidebarPerList.removeClass('show-per-list');
				$sidebarPerList.eq(index1).addClass('show-per-list');

				if(index1 == 1){
					//我的购买切换
					$('#per-buy-ul li').each(function(index2){
						$(this).click(function(){
							var __this = $(this);
							var $buyCon = $('#per-buy-con1, #per-buy-con2, #per-buy-con3');
							$('#per-buy-ul li').removeClass('list-buy-cur');
							$buyCon.removeClass('per-buy-con-cur');
							__this.addClass('list-buy-cur');
							$buyCon.eq(index2).addClass('per-buy-con-cur');
						});
					});
					//我的购买切换结束
				}
			})
		})

		//我的回答

		$('#per-req-ul li').each(function(index){
			$(this).click(function(){
				var __this = $(this);
				var $reqCon = $('#per-req-con1, #per-req-con2');
				$('#per-req-ul li').removeClass('list-buy-cur');
				$reqCon.removeClass('per-buy-con-cur');
				__this.addClass('list-buy-cur');
				$reqCon.eq(index).addClass('per-buy-con-cur');
			});
		});


	});
	</script>
</body>
</html>